﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Device.Infrstructre.Migrations
{
    /// <inheritdoc />
    public partial class 设备 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "CarriersModels",
                columns: table => new
                {
                    CarriersId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CarriersCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CarriersName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Describe = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Office_Id = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    User_Id = table.Column<int>(type: "int", nullable: true),
                    AddName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DelName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DelTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CarriersModels", x => x.CarriersId);
                });

            migrationBuilder.CreateTable(
                name: "EquipmentModels",
                columns: table => new
                {
                    EquipmentId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    EquipmentCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    EquipmentName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AuthorIdentifier = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsAuthorize = table.Column<bool>(type: "bit", nullable: true),
                    EquipmentState = table.Column<int>(type: "int", nullable: true),
                    Eremark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Office_Id = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    User_Id = table.Column<int>(type: "int", nullable: true),
                    AddName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DelName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DelTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EquipmentModels", x => x.EquipmentId);
                });

            migrationBuilder.CreateTable(
                name: "UnitModels",
                columns: table => new
                {
                    UnitId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UnitCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UnitName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Uremark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Office_Id = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    User_Id = table.Column<int>(type: "int", nullable: true),
                    AddName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AddTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DelName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DelTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UnitModels", x => x.UnitId);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "CarriersModels");

            migrationBuilder.DropTable(
                name: "EquipmentModels");

            migrationBuilder.DropTable(
                name: "UnitModels");
        }
    }
}
